package com.jbm.jbmsupplier.util;

/**
 * Created by lyh on 2017-04-13.
 */
////@Entity
////@Table(name = "login_role", schema = "", catalog = "jbmcore")
public class LoginRoleEntity {
    private int id;
    private Integer roleId;
    private Integer loginId;

    ////@Id
    ////@Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    ////@Basic
    ////@Column(name = "role_Id")
    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    ////@Basic
    ////@Column(name = "login_Id")
    public Integer getLoginId() {
        return loginId;
    }

    public void setLoginId(Integer loginId) {
        this.loginId = loginId;
    }

    ////@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        LoginRoleEntity that = (LoginRoleEntity) o;

        if (id != that.id) return false;
        if (loginId != null ? !loginId.equals(that.loginId) : that.loginId != null) return false;
        if (roleId != null ? !roleId.equals(that.roleId) : that.roleId != null) return false;

        return true;
    }

    ////@Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (roleId != null ? roleId.hashCode() : 0);
        result = 31 * result + (loginId != null ? loginId.hashCode() : 0);
        return result;
    }
}
